﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Utils;

namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality
{
    
        public partial class FirstNamesEdit : System.Web.UI.UserControl
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                if ("ID".OwQsIsExist())
                {
                    FirstNameDv.DefaultMode = DetailsViewMode.Edit;
                }
                else
                {
                    FirstNameDv.DefaultMode = DetailsViewMode.Insert;
                }

              
               
                FirstNamesOds.Inserted += new ObjectDataSourceStatusEventHandler(FirstNamesOds_Inserted);
                FirstNamesOds.Deleted += new ObjectDataSourceStatusEventHandler(FirstNamesOds_Deleted);
                FirstNamesOds.Updated += new ObjectDataSourceStatusEventHandler(FirstNamesOds_Updated);

            }

            void FirstNamesOds_Updated(object sender, ObjectDataSourceStatusEventArgs e)
            {
                Response.Redirect("FirstNamesAdmin.aspx");
            }

            void FirstNamesOds_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
            {
                Response.Redirect("FirstNamesAdmin.aspx");

            }

            void FirstNamesOds_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
            {
                Response.Redirect("FirstNamesAdmin.aspx");

            }
        }
    
}